namespace CSharpPro._1021;

public class Dome
{
    public void Main()
    {
        // 测试Student类
        Student student = new Student("小明", 15, "阳光中学");
        Console.WriteLine("=== 学生信息 ===");
        Console.WriteLine(student);
        student.Study();
        Console.WriteLine();

        // 测试Father类
        Father father = new Father("老王", 45, "工程师");
        Console.WriteLine("=== 父亲信息 ===");
        father.Work();
        Console.WriteLine();

        // 测试Son类
        Son son = new Son("小王", 10, "踢足球");
        Console.WriteLine("=== 儿子信息 ===");
        son.Play();
        son.HelpHousework();
        Console.WriteLine();
        
        // 测试多态性
        Child child = new Son("小李", 8, "画画"); 
        Console.WriteLine("\n=== 多态演示 ===");
        child.Play(); 
    }
}